package cn.codeforfun.service;

import cn.codeforfun.handler.Handler;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author wangbin
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TestService {
  @Resource
  private Handler handler;

  public void async() throws InterruptedException {
    handler.async1();
    handler.async2();
    handler.async3();
    handler.async4();
    handler.async5();
  }
}
